home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
clean
/
sun3.lha
/
Sun3
/
seqdemos
/
rfib.icl
< prev
next >
Wrap
Text File
|
1992-08-07
|
336b
|
20 lines
MODULE rfib;
<<
The Nfib function using reals.
To obtain maximum performance guards are used instead of
pattern matching.
>>
IMPORT deltaR;
RULE
:: Nfib REAL -> REAL;
Nfib n -> 1.0 , IF <R n 2.0
-> +R (+R (Nfib (-R n 1.0)) (Nfib (-R n 2.0))) 1.0;
:: Start -> REAL;
Start -> Nfib 26.0;